Optimal. Leaf size=166 \[ -\frac {B n}{9 b (a+b x)^3}+\frac {B d n}{6 b (b c-a d) (a+b x)^2}-\frac {B d^2 n}{3 b (b c-a d)^2 (a+b x)}-\frac {B d^3 n \log (a+b x)}{3 b (b c-a d)^3}+\frac {B d^3 n \log (c+d x)}{3 b (b c-a d)^3}-\frac {A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{3 b (a+b x)^3} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.07, antiderivative size = 166, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 2, integrand size = 31, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.065, Rules used = {2548, 46}
\begin {gather*} -\frac {B \log \left (e (a+b x)^n (c+d x)^{-n}\right )+A}{3 b (a+b x)^3}-\frac {B d^3 n \log (a+b x)}{3 b (b c-a d)^3}+\frac {B d^3 n \log (c+d x)}{3 b (b c-a d)^3}-\frac {B d^2 n}{3 b (a+b x) (b c-a d)^2}+\frac {B d n}{6 b (a+b x)^2 (b c-a d)}-\frac {B n}{9 b (a+b x)^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 46
Rule 2548
Rubi steps
\begin {align*} \int \frac {A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{(a+b x)^4} \, dx &=\int \left (\frac {A}{(a+b x)^4}+\frac {B \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{(a+b x)^4}\right ) \, dx\\ &=-\frac {A}{3 b (a+b x)^3}+B \int \frac {\log \left (e (a+b x)^n (c+d x)^{-n}\right )}{(a+b x)^4} \, dx\\ &=-\frac {A}{3 b (a+b x)^3}-\frac {B \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{3 b (a+b x)^3}+\frac {(B (b c-a d) n) \int \frac {1}{(a+b x)^4 (c+d x)} \, dx}{3 b}\\ &=-\frac {A}{3 b (a+b x)^3}-\frac {B \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{3 b (a+b x)^3}+\frac {(B (b c-a d) n) \int \left (\frac {b}{(b c-a d) (a+b x)^4}-\frac {b d}{(b c-a d)^2 (a+b x)^3}+\frac {b d^2}{(b c-a d)^3 (a+b x)^2}-\frac {b d^3}{(b c-a d)^4 (a+b x)}+\frac {d^4}{(b c-a d)^4 (c+d x)}\right ) \, dx}{3 b}\\ &=-\frac {A}{3 b (a+b x)^3}-\frac {B n}{9 b (a+b x)^3}+\frac {B d n}{6 b (b c-a d) (a+b x)^2}-\frac {B d^2 n}{3 b (b c-a d)^2 (a+b x)}-\frac {B d^3 n \log (a+b x)}{3 b (b c-a d)^3}+\frac {B d^3 n \log (c+d x)}{3 b (b c-a d)^3}-\frac {B \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{3 b (a+b x)^3}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.14, size = 167, normalized size = 1.01 \begin {gather*} -\frac {6 B d^3 n (a+b x)^3 \log (a+b x)-6 B d^3 n (a+b x)^3 \log (c+d x)+(b c-a d) \left (6 A (b c-a d)^2+B n \left (11 a^2 d^2+a b d (-7 c+15 d x)+b^2 \left (2 c^2-3 c d x+6 d^2 x^2\right )\right )+6 B (b c-a d)^2 \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right )}{18 b (b c-a d)^3 (a+b x)^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains higher order function than in optimal. Order 9 vs. order
3.
time = 0.33, size = 1976, normalized size = 11.90
method | result | size |
risch | \(\text {Expression too large to display}\) | \(1976\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 404 vs.
\(2 (155) = 310\).
time = 0.31, size = 404, normalized size = 2.43 \begin {gather*} -\frac {1}{18} \, {\left (\frac {6 \, d^{3} n e \log \left (b x + a\right )}{b^{4} c^{3} - 3 \, a b^{3} c^{2} d + 3 \, a^{2} b^{2} c d^{2} - a^{3} b d^{3}} - \frac {6 \, d^{3} n e \log \left (d x + c\right )}{b^{4} c^{3} - 3 \, a b^{3} c^{2} d + 3 \, a^{2} b^{2} c d^{2} - a^{3} b d^{3}} + \frac {6 \, b^{2} d^{2} n x^{2} e - 3 \, {\left (b^{2} c d n - 5 \, a b d^{2} n\right )} x e + {\left (2 \, b^{2} c^{2} n - 7 \, a b c d n + 11 \, a^{2} d^{2} n\right )} e}{a^{3} b^{3} c^{2} - 2 \, a^{4} b^{2} c d + a^{5} b d^{2} + {\left (b^{6} c^{2} - 2 \, a b^{5} c d + a^{2} b^{4} d^{2}\right )} x^{3} + 3 \, {\left (a b^{5} c^{2} - 2 \, a^{2} b^{4} c d + a^{3} b^{3} d^{2}\right )} x^{2} + 3 \, {\left (a^{2} b^{4} c^{2} - 2 \, a^{3} b^{3} c d + a^{4} b^{2} d^{2}\right )} x}\right )} B e^{\left (-1\right )} - \frac {B \log \left (\frac {{\left (b x + a\right )}^{n} e}{{\left (d x + c\right )}^{n}}\right )}{3 \, {\left (b^{4} x^{3} + 3 \, a b^{3} x^{2} + 3 \, a^{2} b^{2} x + a^{3} b\right )}} - \frac {A}{3 \, {\left (b^{4} x^{3} + 3 \, a b^{3} x^{2} + 3 \, a^{2} b^{2} x + a^{3} b\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 504 vs.
\(2 (155) = 310\).
time = 0.37, size = 504, normalized size = 3.04 \begin {gather*} -\frac {6 \, {\left (A + B\right )} b^{3} c^{3} - 18 \, {\left (A + B\right )} a b^{2} c^{2} d + 18 \, {\left (A + B\right )} a^{2} b c d^{2} - 6 \, {\left (A + B\right )} a^{3} d^{3} + 6 \, {\left (B b^{3} c d^{2} - B a b^{2} d^{3}\right )} n x^{2} - 3 \, {\left (B b^{3} c^{2} d - 6 \, B a b^{2} c d^{2} + 5 \, B a^{2} b d^{3}\right )} n x + {\left (2 \, B b^{3} c^{3} - 9 \, B a b^{2} c^{2} d + 18 \, B a^{2} b c d^{2} - 11 \, B a^{3} d^{3}\right )} n + 6 \, {\left (B b^{3} d^{3} n x^{3} + 3 \, B a b^{2} d^{3} n x^{2} + 3 \, B a^{2} b d^{3} n x + {\left (B b^{3} c^{3} - 3 \, B a b^{2} c^{2} d + 3 \, B a^{2} b c d^{2}\right )} n\right )} \log \left (b x + a\right ) - 6 \, {\left (B b^{3} d^{3} n x^{3} + 3 \, B a b^{2} d^{3} n x^{2} + 3 \, B a^{2} b d^{3} n x + {\left (B b^{3} c^{3} - 3 \, B a b^{2} c^{2} d + 3 \, B a^{2} b c d^{2}\right )} n\right )} \log \left (d x + c\right )}{18 \, {\left (a^{3} b^{4} c^{3} - 3 \, a^{4} b^{3} c^{2} d + 3 \, a^{5} b^{2} c d^{2} - a^{6} b d^{3} + {\left (b^{7} c^{3} - 3 \, a b^{6} c^{2} d + 3 \, a^{2} b^{5} c d^{2} - a^{3} b^{4} d^{3}\right )} x^{3} + 3 \, {\left (a b^{6} c^{3} - 3 \, a^{2} b^{5} c^{2} d + 3 \, a^{3} b^{4} c d^{2} - a^{4} b^{3} d^{3}\right )} x^{2} + 3 \, {\left (a^{2} b^{5} c^{3} - 3 \, a^{3} b^{4} c^{2} d + 3 \, a^{4} b^{3} c d^{2} - a^{5} b^{2} d^{3}\right )} x\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 448 vs.
\(2 (155) = 310\).
time = 4.21, size = 448, normalized size = 2.70 \begin {gather*} -\frac {B d^{3} n \log \left (b x + a\right )}{3 \, {\left (b^{4} c^{3} - 3 \, a b^{3} c^{2} d + 3 \, a^{2} b^{2} c d^{2} - a^{3} b d^{3}\right )}} + \frac {B d^{3} n \log \left (d x + c\right )}{3 \, {\left (b^{4} c^{3} - 3 \, a b^{3} c^{2} d + 3 \, a^{2} b^{2} c d^{2} - a^{3} b d^{3}\right )}} - \frac {B n \log \left (b x + a\right )}{3 \, {\left (b^{4} x^{3} + 3 \, a b^{3} x^{2} + 3 \, a^{2} b^{2} x + a^{3} b\right )}} + \frac {B n \log \left (d x + c\right )}{3 \, {\left (b^{4} x^{3} + 3 \, a b^{3} x^{2} + 3 \, a^{2} b^{2} x + a^{3} b\right )}} - \frac {6 \, B b^{2} d^{2} n x^{2} - 3 \, B b^{2} c d n x + 15 \, B a b d^{2} n x + 2 \, B b^{2} c^{2} n - 7 \, B a b c d n + 11 \, B a^{2} d^{2} n + 6 \, A b^{2} c^{2} + 6 \, B b^{2} c^{2} - 12 \, A a b c d - 12 \, B a b c d + 6 \, A a^{2} d^{2} + 6 \, B a^{2} d^{2}}{18 \, {\left (b^{6} c^{2} x^{3} - 2 \, a b^{5} c d x^{3} + a^{2} b^{4} d^{2} x^{3} + 3 \, a b^{5} c^{2} x^{2} - 6 \, a^{2} b^{4} c d x^{2} + 3 \, a^{3} b^{3} d^{2} x^{2} + 3 \, a^{2} b^{4} c^{2} x - 6 \, a^{3} b^{3} c d x + 3 \, a^{4} b^{2} d^{2} x + a^{3} b^{3} c^{2} - 2 \, a^{4} b^{2} c d + a^{5} b d^{2}\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 4.91, size = 317, normalized size = 1.91 \begin {gather*} \frac {2\,A\,a\,c\,d}{3\,{\left (a\,d-b\,c\right )}^2\,{\left (a+b\,x\right )}^3}-\frac {A\,b\,c^2}{3\,{\left (a\,d-b\,c\right )}^2\,{\left (a+b\,x\right )}^3}-\frac {B\,\ln \left (\frac {e\,{\left (a+b\,x\right )}^n}{{\left (c+d\,x\right )}^n}\right )}{3\,b\,{\left (a+b\,x\right )}^3}-\frac {A\,a^2\,d^2}{3\,b\,{\left (a\,d-b\,c\right )}^2\,{\left (a+b\,x\right )}^3}-\frac {B\,b\,c^2\,n}{9\,{\left (a\,d-b\,c\right )}^2\,{\left (a+b\,x\right )}^3}-\frac {5\,B\,a\,d^2\,n\,x}{6\,{\left (a\,d-b\,c\right )}^2\,{\left (a+b\,x\right )}^3}-\frac {B\,b\,d^2\,n\,x^2}{3\,{\left (a\,d-b\,c\right )}^2\,{\left (a+b\,x\right )}^3}+\frac {7\,B\,a\,c\,d\,n}{18\,{\left (a\,d-b\,c\right )}^2\,{\left (a+b\,x\right )}^3}-\frac {11\,B\,a^2\,d^2\,n}{18\,b\,{\left (a\,d-b\,c\right )}^2\,{\left (a+b\,x\right )}^3}+\frac {B\,b\,c\,d\,n\,x}{6\,{\left (a\,d-b\,c\right )}^2\,{\left (a+b\,x\right )}^3}-\frac {B\,d^3\,n\,\mathrm {atan}\left (\frac {a\,d\,1{}\mathrm {i}+b\,c\,1{}\mathrm {i}+b\,d\,x\,2{}\mathrm {i}}{a\,d-b\,c}\right )\,2{}\mathrm {i}}{3\,b\,{\left (a\,d-b\,c\right )}^3} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________